package sharewithus.utils;

import java.util.ArrayList;
import java.util.List;

import sharewithus.business.dto.UserExtDTO;
import framelib.common.FrameCommon;
import framelib.utils.PropReader;

public class UserUtil {
	
	public static List getUserExt() {
		List userExtList = new ArrayList();
		try {
	        String[] userExts = new PropReader(FrameCommon.PNN_EXTVALUE_CONFIG).getString(FrameCommon.PNN_EXTVALUE_CONFIG_USER).split(",");
	        for(int i = 0; i < userExts.length; i++){
	        	UserExtDTO uet = new UserExtDTO();
	        	uet.setId(userExts[i].split("-")[0]);
	        	uet.setParamName(userExts[i].split("-")[1]);
	        	uet.setLableName(userExts[i].split("-")[2]);
	        	uet.setIndexNo(userExts[i].split("-")[3]);
	        	uet.setType(userExts[i].split("-")[4]);
	        	uet.setDefaultValue(userExts[i].split("-")[5]);
	        	uet.setSelectValue(userExts[i].split("-")[6]);
	        	uet.setState(userExts[i].split("-")[7]);
	        	uet.setFlag(userExts[i].split("-")[8]);
	        	userExtList.add(uet);
	        }
		} catch (Exception e) {
	        // TODO Auto-generated catch block
	        e.printStackTrace();
        }
        return userExtList;
	}
}
